import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import { ElNotification } from "element-plus";
import HeaderView from "./components/common/headerView.vue";
import StarView from "./components/common/starView.vue";
import FooterView from "./components/common/footerView.vue";
import "./assets/fontawesom/css/all.min.css";
import "element-plus/dist/index.css";
import "../src/assets/iconfont/iconfont.css";
import "./assets/css/globel.css";
const app = createApp(App);

app.config.globalProperties.$notify = ElNotification;
app.use(ElementPlus);
app.use(router);
app.use(store);
app.component("HeaderView", HeaderView);
app.component("StarView", StarView);
app.component("FooterView", FooterView);
app.mount("#app");
// 页面自动回到头部 跳转后
router.afterEach((to, from, next) => {
  window.scrollTo(0, 0);
});
